package com.cq.hd.member.po;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商户资金流水表
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_merchant_amt_bill")
@ApiModel(value="TbMerchantAmtBillPo对象", description="商户资金流水表")
public class TbMerchantAmtBillPo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "流水编号")
    @TableField("bill_no")
    private String billNo;

    @ApiModelProperty(value = "商户id")
    @TableField("merchant_id")
    private Long merchantId;

    @ApiModelProperty(value = "收支类型(1-收入，2-支出)")
    @TableField("bill_type")
    private Integer billType;

    @ApiModelProperty(value = "交易类型(1-订单本金，2-订单补贴，3-本金提现，4-补贴提现，5-本金提现失败退回，6-补贴提现失败退回，7-订单收入)")
    @TableField("trade_type")
    private Integer tradeType;

    @ApiModelProperty(value = "关联交易单号（子订单号/提现单号）")
    @TableField("relation_trade_no")
    private String relationTradeNo;

    @ApiModelProperty(value = "变动前余额")
    @TableField("before_amt")
    private BigDecimal beforeAmt;

    @ApiModelProperty(value = "变动金额")
    @TableField("trade_amt")
    private BigDecimal tradeAmt;

    @ApiModelProperty(value = "变动后余额")
    @TableField("after_amt")
    private BigDecimal afterAmt;

    @ApiModelProperty(value = "交易时间（收款时间/补贴时间/提现时间）")
    @TableField("trade_time")
    private LocalDateTime tradeTime;

    @ApiModelProperty(value = "创建者")
    @TableField("create_by")
    private Integer createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者")
    @TableField("update_by")
    private Integer updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "删除状态:0-正常，1-已删除")
    @TableField("del_state")
    private Integer delState;


}
